package pl.edu.agh.logview.model;

import java.util.Date;

import com.j256.ormlite.field.DatabaseField;
import com.j256.ormlite.table.DatabaseTable;

@DatabaseTable(tableName = "message")
public class Message {

	@DatabaseField(generatedId=true)
	private long id;
	
	@DatabaseField(foreign=true)
	private Agent agentFrom;
	
	@DatabaseField(foreign=true)
	private Agent agentTo;
	
	@DatabaseField
	private Date actionTime;
	
	@DatabaseField
	private String message;
	
	public Message() { }

	public long getId() {
		return id;
	}

	public void setId(long id) {
		this.id = id;
	}

	public Agent getAgentFrom() {
		return agentFrom;
	}

	public void setAgentFrom(Agent agentFrom) {
		this.agentFrom = agentFrom;
	}

	public Agent getAgentTo() {
		return agentTo;
	}

	public void setAgentTo(Agent agentTo) {
		this.agentTo = agentTo;
	}

	public Date getActionTime() {
		return actionTime;
	}

	public void setActionTime(Date actionTime) {
		this.actionTime = actionTime;
	}

	public String getMessage() {
		return message;
	}

	public void setMessage(String message) {
		this.message = message;
	}
	
}
